<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Xu">

    <title>统计表</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">

</head>

<body>
<div th:insert="~{commons/common::navbar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:insert="~{commons/common::sidebar(active='complex.html')}" ></div>

        <main role="main" class=" col-sm-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div style="border: 1px #9fcdff solid" class="table-responsive col-sm-4 ">
                <h5>发货最多的客户：</h5>
            <table style="background-color: #beecff" class="table table-striped table-sm col-sm-4">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>发货数量</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="mostPackage:${mostPackages}">
                    <td th:text="${mostPackage.getCid()}"></td>
                    <td th:text="${mostPackage.getCname()}"></td>
                    <td th:text="${mostPackage.getNumber()}"></td>
                </tr>

                </tbody>
            </table>
        </div>
            <div style="border: 1px #9fcdff solid" class="table-responsive col-sm-4 offset-6">
                <h5>发货最多的地区：</h5>
                <table style="background-color: #c3e6cb" class="table table-striped table-sm col-sm-4">
                    <thead>
                    <tr>
                        <th>地区</th>
                        <th>数量</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="mostCustomer:${mostCustomers}">
                        <td th:text="${mostCustomer.getAddress()}"></td>
                        <td th:text="${mostCustomer.getNumber()}"></td>
                    </tr>

                    </tbody>
                </table>
            </div>
            <div style="border: 1px #9fcdff solid" class="table-responsive col-sm-4 ">
                <h5>收件最多的用户：</h5>
                <table style="background-color: #ecef86" class="table table-striped table-sm col-sm-4">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>姓名</th>
                        <th>收件数量</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="mostRecipient:${mostRecipients}">
                        <td th:text="${mostRecipient.getRid()}"></td>
                        <td th:text="${mostRecipient.getRname()}"></td>
                        <td th:text="${mostRecipient.getNumber()}"></td>
                    </tr>

                    </tbody>
                </table>
            </div>
            <div style="border: 1px #9fcdff solid" class="table-responsive col-sm-4 offset-6">
                <h5>派送最多包裹的员工：</h5>
                <table style="background-color: #ffe0b0" class="table table-striped table-sm col-sm-4">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>姓名</th>
                        <th>派送数量</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="mostStaff:${mostStaffs}">
                        <td th:text="${mostStaff.getSid()}"></td>
                        <td th:text="${mostStaff.getSname()}"></td>
                        <td th:text="${mostStaff.getNumber()}"></td>
                    </tr>

                    </tbody>
                </table>
            </div>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="asserts/js/popper.min.js"></script>
<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>

<!-- Icons -->
<script type="text/javascript" src="asserts/js/feather.min.js"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" src="../../static/asserts/js/Chart.min.js"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>

</body>

</html>